//
//  LXCommissionOptionCell.m
//  绿稀全球购
//
//  Created by 王敏 on 16/6/11.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "LXCommissionOptionCell.h"

@interface LXCommissionOptionCell()

@property(nonatomic,strong)UIImageView * backgroungImageView;

@property(nonatomic,strong)UIView * underlLine;

@end

@implementation LXCommissionOptionCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if(self = [super initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuseIdentifier]){
        self.cellHeight = 60;
        self.contentView.backgroundColor = [UIColor clearColor];
        self.backgroundColor = [UIColor clearColor];
        UIImageView * backgroungImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, ScreenSize.width-20, self.cellHeight)];
        [self addSubview:backgroungImageView];
        [self sendSubviewToBack:backgroungImageView];
        self.backgroungImageView = backgroungImageView;
        
        UIView * underLine = [[UIView alloc] initWithFrame:CGRectZero];
        underLine.backgroundColor = RGBColor(245, 245, 245);
        [self.contentView addSubview:underLine];
        self.underlLine = underLine;
        self.enableUnderLine = YES;
    }
    return self;
}



-(void)layoutSubviews{
    [super layoutSubviews];
    self.underlLine.x = 0;
    self.underlLine.y = self.cellHeight-1;
    self.underlLine.height = 1;
    self.underlLine.width = self.width;
}

-(void)setBackgroundImage:(UIImage *)backgroundImage{
    _backgroundImage = backgroundImage;
    self.backgroungImageView.image = backgroundImage;
}

-(void)setEnableUnderLine:(BOOL)enableUnderLine{
    _enableUnderLine = enableUnderLine;
    self.underlLine.hidden = !enableUnderLine;
}



-(void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
    
}

-(void)setSelected:(BOOL)selected animated:(BOOL)animated{
    
}
@end
